package com.wgu.modules.repository;

import com.wgu.entity.ChapterDetailInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @Author: w
 * @Date: 2019/7/5 9:37
 * @Version 1.0
 */
@Repository
public interface ChapterDetailRepository extends JpaRepository<ChapterDetailInfo,Long>{
    /**
     * 根据章节ID查找章节
     * @param chapterId
     * @return
     */
    Optional<ChapterDetailInfo> findByChapterId(Long chapterId);
}
